package com.shangxian.giveithome.mapper;

import com.shangxian.giveithome.entity.VolunteerExamine;
import com.shangxian.giveithome.entity.VolunteerUser;
import com.shangxian.giveithome.entity.Volunteer;
import com.shangxian.giveithome.entity.VolunteerCreate;
import com.shangxian.giveithome.entity.VolunteerListExamine;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VolunteerMapper {
    /**
     * 根据机构idj【简单】查询义工审核
     *
     * @param mr_id
     * @return
     */
    List<VolunteerExamine> queryStatusById(Long mr_id);

    /**
     * 根据条件查询义工列表
     *
     * @param sps
     * @param aLong
     * @param pageNum
     * @param pages
     * @return
     */
    List<VolunteerListExamine> queryStatusByVolunteer(@Param("sps") List<String> sps, @Param("me_id") Long aLong,
                                                      @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pages);

    /**
     * 根据条件查询义工总数
     *
     * @param sps
     * @param aLong
     * @return
     */
    Integer countStatusByVolunteer(@Param("sps") List<String> sps, @Param("me_id") Long aLong);

    /**
     * 查看待审核数量
     *
     * @param id
     * @return
     */
    Integer countStatus0(Long id);


    /**
     * 查询义工列表
     *
     * @param aLong
     * @param pageNum
     * @param pages
     * @return
     */
    List<VolunteerListExamine> queryStatusVolunteer(@Param("me_id") Long aLong,
                                                    @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pages);

    /**
     * 查询义工详情
     *
     * @param id
     * @return
     */
    Volunteer queryDetails(Long id);

    /**
     * 查看特长集合
     *
     * @param list
     * @return
     */
    List<String> querySpecialityDetails(@Param("list") List<String> list);

    /**
     * 查看义工审核详情
     *
     * @param id
     * @return
     */
    Volunteer queryExamineDetails(Long id);

    /**
     * 义工申请
     * @param volunteerCreate
     */
    void createVolun(VolunteerCreate volunteerCreate);


    /**
     * 义工删除
     * @param aLong
     * @param id
     */
    void delete(@Param("aLong") Long aLong, @Param("id") Long id);


    Integer queryExistence(@Param("me_id") Long me_id, @Param("us_id") Long us_id);

    void updateVolunteerStatusYes(@Param("meId") Long aLong, @Param("id") Long id);

    void deleteVoluStatusNo(Long aLong, Long id);

    List<VolunteerUser> queryVolunTeerS(Long us_id);

    Long queryUserId(@Param("id")Long id, @Param("meId") Long meId);
}
